import React, { Component } from 'react'

import Child from './Child'

export default class App extends Component {
  state = {
    text: '11',
  }
  constructor() {
    super()
    console.log('constructor')
  }

  render() {
    return (
      <div>
        <h1>App</h1>
        {this.state.text}
        <button onClick={() => this.setState({ text: '22' })}>click</button>
        <div>
          <Child text={this.state.text}></Child>
        </div>
      </div>
    )
  }
}
